<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>v-html指令使用</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id="app">
    <!-- 不能识别html代码，内容原样示 -->
    <h2>{{ url }}</h2>
    <!-- 识别html代码，内容展示为连接，可实现跳转 -->
    <h2 v-html="url"></h2>
  </div>

  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        message: "你好啊",
        url: '<a href="http://www.baidu.com">百度一下</a>'
      },
      methods: {
      }
    });
  </script>
</body>

</html>